#include<stdio.h>
int main()
{
	int num;
	int ge,shi,bai;
	while(scanf("%d",&num)!=EOF)
	{
		if(num>99&&num<1000)
		{
			ge=num%10;
			shi=num/10%10;
			bai=num/100;
			printf("%d%d%d\n",ge,shi,bai);
		}
		else
		return 0;
	}
	return 0;
}
